package org.jobtask.ui;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.border.TitledBorder;

import org.jobtask.config.ResourceMessages;

public class MonitorPanel extends JPanel{

	/**
	 * 
	 */
	private static final long serialVersionUID = -495298336041908546L;

	public MonitorPanel(CommonComponents comp){
		this.initPanel(comp);
	}
	
	private void initPanel(CommonComponents comp){
		this.setLayout(new BorderLayout());
		JPanel topPanel=new JPanel();
		topPanel.add(comp.getCtrlBut());
		topPanel.add(comp.getClearBut());
		JScrollPane infoPanel=new JScrollPane(comp.getText());
		TitledBorder listTitleBorder=BorderFactory.createTitledBorder(ResourceMessages.getString("CommonComp.11"));
		listTitleBorder.setBorder(BorderFactory.createLineBorder(new Color(68,68,68)));
		listTitleBorder.setTitleColor(new Color(104,156,226));
		infoPanel.setBorder(listTitleBorder);
		infoPanel.setOpaque(false);
		this.add(topPanel,BorderLayout.PAGE_START);
		this.add(infoPanel);
	}
}
